Motion vector scaling for non-uniform motion vector grid

ABSTRACT

In one embodiment, a method determines a scaled motion vector for a first block. A motion vector for a second block is determined where the motion vector is on a non-uniform motion vector grid. The method then maps the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid and scales the motion vector for the second block on the higher accuracy motion vector grid. The scaled motion vector is mapped on the higher accuracy motion vector grid to the non-uniform motion vector grid. The scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority to U.S. Provisional App. No. 61/556,147 for “Motion Vector Scaling for Non-Uniform Motion Vector Grid” filed Nov. 4, 2011, the contents of which is incorporated herein by reference in its entirety.

BACKGROUND

High-efficiency video coding (HEVC) is a block-based hybrid spatial and temporal predictive coding scheme. Similar to other video coding standards, such as motion picture experts group (MPEG)-1, MPEG-2, and MPEG-4, HEVC supports intra-picture, such as I picture, and inter-picture, such as B picture. In HEVC, P and B pictures are consolidated into a general B picture that can be used as a reference picture.

Intra-picture is coded without referring to any other pictures. Thus, only spatial prediction is allowed for a coding unit (CU)/prediction unit (PU) inside an intra-picture. Inter-picture, however, supports both intra- and inter-prediction. A CU/PU in an inter-picture may be either spatially or temporally predictive coded. Temporal predictive coding may reference pictures that were previously coded.

Temporal motion prediction is an effective method to increase the coding efficiency and provides high compression. HEVC uses a translational model for motion prediction. According to the translational model, a prediction signal for a given block in a current picture is generated from a corresponding block in a reference picture. The coordinates of the reference block are given by a motion vector that describes the translational motion along horizontal (x) and vertical (y) directions that would be added/subtracted to/from the coordinates of the current block. A decoder needs the motion vector to decode the compressed video.

The pixels in the reference frame are used as the prediction. In one example, the motion may be captured in integer pixels. However, not all objects move with the spacing of integer pixels (also referred to as pel). For example, since an object motion is completely unrelated to the sampling grid, sometimes the object motion is more like sub-pixel (fractional) motion than a full-pel one. Thus, HEVC allows for motion vectors with sub-pixel accuracy.

In order to estimate and compensate sub-pixel displacements, the image signal on these sub-pixel positions is generated by an interpolation process. In HEVC, sub-pixel interpolation is performed using finite impulse response (FIR) filters. Generally, the filter may have 8 taps to determine the sub-pixel values for sub-pixel positions, such as half-pel and quarter-pel positions. The taps of an interpolation filter weight the integer pixels with coefficient values to generate the sub-pixel signals. Different coefficients may produce different compression performance in signal distortion and noise.

FIG. 1 depicts positions of half-pel and fractional-pel (e.g., quarter-pel) pixels between full-pel pixels along a pixel line within an image according to one embodiment. For example, the pixel line may be along a row or column on an image. Multiple interpolation calculations may be made along different rows and columns of an image. Full-pel pixels are represented by integer pixels and are shown in FIG. 1 as pixels L3, L2, L1, L0, R0, R1, R2, and R3. H is a half-pel pixel between full-pel pixels L0 and R0. FL is a sub-pixel pixel (fractional -pel pixel) between full-pel pixels L0 and H and FR is a sub-pixel pixel between half-pel pixel H and full-pel pixel R0.

The fractional -pel and half-pel pixels may be interpolated using the values of spatial neighboring full-pel pixels. For example, the half-pel pixel H may be interpolated using the values of full-pel pixels L3, L2, L1, L0, R0, R1, R2, and R3. Different coefficients may also be used to weight the values of the neighboring pixels and provide different characteristics of filtering.

A uniform sub-pixel spacing may be used. For example, sub-pixel phase offsets are allowed that correspond to quarter, half and three quarter pixel offsets. FIG. 2 is an example of a fixed, uniform, four position sub-pixel motion vector grid, FIG. 3 is an example of a fixed, uniform, eight position sub-pixel motion vector grid, and FIG. 4 is an example of a fixed, uniform, sixteen position sub-pixel motion vector grid. In these three examples, L0 and R0 are the integer pixels and the pixels between L0 and R0 are fractional-pixels.

A motion vector (MV) is a two-dimensional vector (MV_(X), MV_(Y)) that is used for inter prediction that provides an offset from the coordinates in the decoded picture to the coordinates in a reference picture. The motion vector may be represented by integer numbers, but the accuracy may be at quarter-pel resolution. That is, if one component of the motion vector (either MV_(X) or MV_(Y)) has a remainder of “0” when dividing by 4, it is an integer-pel motion vector component; if one component of the motion vector has a remainder of “1” when dividing by 4, it is a quarter-pel motion vector component; if one component of the motion vector has a remainder of “2” when dividing by 4, it is a half-pel motion vector component; and if one component of the motion vector has a remainder of “3” when dividing by 4, it is a three-quarter-pel motion vector component.

Motion vectors are predictively coded with predictors chosen from motion vectors of spatial neighboring blocks and/or temporal collocated blocks. The motion vectors of these spatial neighboring blocks and temporal collocated blocks may point to different reference pictures that have a different temporal distance from the reference picture of a current block. To have the motion vector of the spatial neighboring blocks and temporal collocated blocks point to the reference picture of the current block, motion vector scaling is used to scale the motion vector to point to the reference picture of the current block. The scaling uses the differences in temporal distance.

On a uniform motion vector grid, scaling of the motion vector may be very close to scaling of the corresponding motion offset. For example, the motion vector scaling is performed according to temporal distance between the current picture and the reference pictures. Given a current block in a current picture, the motion vector scaling theoretically could be performed as:

MV _(Pscaled)=(TD _(ref) ×MV _(P))/TD _(P)   (1)

where MV_(P) is the motion vector predictor for the current block, TD_(ref) is the temporal distance between the current picture and the reference picture for the current block, and TD_(P) is the temporal distance between the picture where the motion vector predictor MV_(P) resides and the reference picture that MV_(P) points to.

If infinite precision is allowed for motion vectors MV_(P) and MV_(Pscaled), the above equation is accurate. However, if the precision is only at quarter-pel, a good approximation is necessary. For example, assuming in one example, a motion vector component has a value 1 on a four position sub-pixel motion vector grid, and temporal distances TD_(ref) and TD_(P) are equal to 4 and 1, respectively. By using the scaling equation (1), the motion vector component of value 1 is scaled to:

MV _(Pscaled)=(TD _(ref) ×MV _(P))/TD _(P)=(4×1)/1=4

On a four position sub-pixel motion vector grid, a motion vector component of value 4 means a motion offset of 1 pel. On uniform four position sub-pixel motion vector grid (FIG. 2), a motion vector component of value 1 represents a motion offset component of ¼ pel. Using the same scaling equation, the motion offset component of ¼ pel is scaled to

MV _(Pscaled)=(TD _(ref) ×MV _(P))/TD _(P)=(4×(¼))/1=1 (pel)

As seen, for this example, scaling of motion vector component exactly matches scaling of motion offset as both give a motion offset of 1 pel. However, the problem with uniform distribution of sub-sample positions is that it may not be the optimal for a given set of filter restrictions, such as number of taps or the power spectral density of the reference block.

SUMMARY

In one embodiment, a method determines a scaled motion vector for a first block. A motion vector for a second block is determined where the motion vector is on a non-uniform motion vector grid. The method then maps the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid and scales the motion vector for the second block on the higher accuracy motion vector grid. The scaled motion vector is mapped on the higher accuracy motion vector grid to the non-uniform motion vector grid. The scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process.

In one embodiment, a method is provided for determining a scaled motion vector for a first block, the method comprising: receiving a bitstream from an encoder at a decoder; determining a motion vector for a second block using information in the bitstream, wherein the motion vector is on a non-uniform motion vector grid; mapping, by the decoder, the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling, by the decoder, the motion vector for the second block on the higher accuracy motion vector grid; and mapping, by the decoder, the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process to decode the bitstream.

In one embodiment, an apparatus is provided that is configured to determine a scaled motion vector for a first block, the apparatus comprising: one or more computer processors; and a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for: determining a motion vector for a second block, wherein the motion vector is on a non-uniform motion vector grid; mapping the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling the motion vector for the second block on the higher accuracy motion vector grid; and mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process.

In one embodiment, an apparatus is provided that is configured to determine a scaled motion vector for a first block, the apparatus comprising: one or more computer processors; and a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for: receiving a bitstream from an encoder at a decoder; determining a motion vector for a second block using information in the bitstream, wherein the motion vector is on a non-uniform motion vector grid; mapping the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling the motion vector for the second block on the higher accuracy motion vector grid; and mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process to decode the bitstream.

The following detailed description and accompanying drawings provide a better understanding of the nature and advantages of particular embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts positions of half-pel and quarter-pel pixels between full-pel pixels along a pixel line within an image according to one embodiment.

FIG. 2 is an example of a fixed, uniform, four position sub-pixel motion vector grid.

FIG. 3 is an example of a fixed, uniform, eight position sub-pixel motion vector grid.

FIG. 4 is an example of a fixed, uniform, sixteen position sub-pixel motion vector grid.

FIG. 5 depicts a simplified system for scaling motion vectors on a non-uniform motion vector grid according to one embodiment.

FIG. 6 includes a fixed, non-uniform, four-position sub-pixel motion vector grid with a ⅛ pixel phase offset, a ½ pixel phase offset, and a ⅞ pixel phase offset.

FIG. 7 depicts a fixed, non-uniform, four-position sub-pixel motion vector grid with a 3/16 pixel phase offset, a ½ pixel phase offset, and a 13/16 pixel phase offset.

FIG. 8A depicts a motion vector scaling for a spatial neighboring block.

FIG. 8B depicts a motion vector scaling for a temporal co-located block according to one embodiment.

FIG. 9 depicts a simplified flowchart of a method for performing scaling for a non-uniform motion vector grid according to one embodiment.

FIG. 10 depicts an example of the map-up process on a non-uniform motion vector grid according to one embodiment.

FIG. 11 shows an example of the map down process according to one embodiment.

FIG. 12A depicts an example of an encoder according to one embodiment.

FIG. 12B depicts an example of a decoder according to one embodiment.

DETAILED DESCRIPTION

Described herein are techniques for a video compression system. In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of particular embodiments. Particular embodiments as defined by the claims may include some or all of the features in these examples alone or in combination with other features described below, and may further include modifications and equivalents of the features and concepts described herein.

FIG. 5 depicts a simplified system 500 for scaling motion vectors on a non-uniform motion vector grid according to one embodiment. System 500 includes an encoder 502 and a decoder 504 for encoding and decoding video content. Encoder 502 and decoder 504 perform temporal prediction through motion estimation and motion compensation. Motion estimation is a process of determining a motion vector (MV) for a current block (e.g., a unit) of video. Motion compensation is applying the motion vector to the current block. For example, the temporal prediction searches for a best match prediction for a current prediction unit (PU) over reference pictures. The best match prediction is described by the motion vector and associated reference picture ID. Also, a PU in a B picture may have up to two motion vectors.

The temporal prediction allows for fractional (sub-pixel) picture accuracy. Sub-pixel prediction is used because motion during two instances of time (the current and reference frames' capture times) can correspond to a sub-pixel position in pixel coordinates and generation of different prediction data corresponding to each sub-pixel position allows for the possibility of conditioning the prediction signal to better match the signal in the current PU.

In the temporal prediction process, a motion vector scaling manager 506, either in encoder 502 or decoder 504, uses a motion vector scaling process for a non-uniform motion vector grid. A non-uniform motion vector grid allows non-uniform sub-pixel phase offsets between integer pixels. For example, sub-pixel phase offsets may be non-uniform in spacing and/or include a different number of phase offsets. A phase offset is an offset of a sub-pixel position from a full-pel position. For example, the non-uniform phase offsets may include phase offsets at a ⅛ pixel phase offset, a ½ pixel phase offset, and a ⅞ pixel phase offset in addition to a 0 phase filter that may use the samples without any filtering. Other non-uniform phase offsets may also be appreciated. Conventionally, a fixed resolution of offsets was used, such as phase offsets that correspond to quarter, half, and three-quarter pixel offsets. For example, uniform phase offsets may be ¼, ½, and ¾ offsets where the uniform spacing is ¼ pel. However, a problem with a uniform distribution of sub-pixel positions is that these uniform sub-pixel positions may not be optimal.

In one embodiment, the phase offsets for sub-pixel positions may be determined based on characteristics of the encoding or decoding process. For example, the characteristics may be statistical information from video content, such as broadcast video, being encoded or decoded. Additionally, the characteristics may be a coding condition, such as properties of an interpolation filter, a type of prediction (e.g., from one reference block or from many reference blocks), and/or the compression noise statistical characteristics. Also, optimal sub-pixel positions may require different phase offsets in a vertical dimension and/or a horizontal dimension. Thus, different phase offsets may be selected based on different characteristics of the encoding or decoding process.

FIG. 6 depicts a first example of non-uniform phase offsets and FIG. 7 depicts a second example of non-uniform phase offsets according to one embodiment. FIG. 6 includes a fixed, non-uniform, four-position sub-pixel motion vector grid with a ⅛ pixel phase offset, a ½ pixel phase offset, and a ⅞ pixel phase offset. FIG. 7 depicts a fixed, non-uniform, four-position sub-pixel motion vector grid with a 3/16 pixel phase offset, a ½ pixel phase offset, and a 13/16 pixel phase offset. In both of these examples, L0 and R0 are integer pixels and the pixels between L0 and R0 are fractional-pixels. As seen in FIG. 6, the spacing between sub-pixels is non-uniform. For example, the spacing between pixel L0 and the ⅛ pixel phase offset is different from the spacing between the ⅛ pixel phase offset and the ½ pixel phase offset. Other non-uniform spacing exists between the ½ pixel phase offset and ⅞ pixel phase offset, and the ⅞ pixel phase offset and the R0 pixel. The same is true for the second example shown in FIG. 7. This is contrasted with the pixel phase offsets shown in FIGS. 2-4 in the Background section. Those pixel phase offsets are uniformly spaced between each other.

As described above, motion vectors are predictively coded with predictors chosen from motion vectors of spatial neighboring blocks and/or temporal co-located blocks. Motion vector scaling is used to scale a motion vector for the spatial neighboring block and/or temporal co-located block to a scaled motion vector for the current block. However, when non-uniform phase offsets are used, the scaling as applied to uniform phase offsets may not be accurate for the scaling of the corresponding motion offset for the current block.

FIG. 8A depicts a motion vector scaling for a spatial neighboring block and FIG. 8B depicts a motion vector scaling for a temporal co-located block according to one embodiment. In FIG. 8A, at 802, a current picture is being coded. At 804, a current block is shown that is being coded. In this case, at 806, a motion vector predictor MV_(P) for a spatial neighboring block is shown. Motion vector predictor MV_(P) points to a reference picture at 808. Also, at 810, a reference picture for the current block is shown.

A temporal distance difference between the reference picture at 808 and the reference picture at 810 exists. For example, the temporal distance between the current picture and the reference picture at 808 is a distance TD_(P) and the temporal distance between the reference picture at 810 and the current picture is a distance TD_(ref). A scaled motion vector MV_(Pscaled) is then calculated for the current block using the temporal distances. Although temporal distance is described, other measures may be used for scaling, such as picture order.

For FIG. 8B, the scaling may be performed for the co-located block shown at 850. In this case, the temporal distance TD_(P) is the difference between the current picture including the co-located block and a reference picture shown at 852 in which the motion vector predictor MV_(P) on the co-located block points. Additionally, the temporal distance TD_(ref) is the difference between the current picture including the current block and a reference picture shown at 854. The temporal distances TD_(P) and TD_(ref) are used to scale the motion vector predictor MV_(P) to determine a scaled motion vector predictor MV_(Pscaled) for the current block.

When performing scaling as described above in the Background section on a non-uniform four-position sub-pixel motion vector grid as shown in FIG. 6 or 7, a motion vector component of the value “1” represents a motion offset component of the 3/16 pixel phase offset. Using the scaling equation (1), the motion offset component of the 3/16 pixel phase offset is scaled to:

MV _(Pscaled)=(TD _(ref) ×MV _(P))/TD _(P)=(4×( 3/16))/1= 12/16 (pel)

The scaling of the motion vector component of the value “1” gives a motion offset of 1 pel, but the scaling of the motion offset component gives a motion offset of 12/16 pel. The 12/16 pel value is different from the value of 1 pel. This may not be an accurate scaling.

Accordingly, a motion vector scaling manager 506, either in encoder 502 or decoder 504, uses a motion vector scaling process for a non-uniform motion vector grid that is different from the scaling process for the uniform motion vector grid described above in the Background. FIG. 9 depicts a simplified flowchart 900 of a method for performing scaling for a non-uniform motion vector grid according to one embodiment. At 902, motion vector scaling manager 506 performs a map up process. The map up process maps a motion vector MV_(XOri), MV_(YOri) on a non-uniform motion vector grid up to a higher accuracy motion vector grid. This results in a mapped motion vector MV_(XHA), MV_(YHA) on a higher accuracy motion vector grid. FIG. 10 depicts an example of the map-up process on a non-uniform motion vector grid according to one embodiment. In this example, a fixed non-uniform, four-position sub-pixel motion vector grid with a 3/16 pixel phase offset, a ½ pixel phase offset, and a 13/16 pixel phase offset is used. Also, integer pixels L0 and R0 are shown. The original motion vector components MV_(XOri), MV_(YOri) have remainders of 0, 1, 2, and 3 when dividing by 4. This is shown at 1002 where the remainders of 0, 1, 2, and 3 correspond to the L0 pixel, 3/16 sub-pixel offset, the ½ sub-pixel offset, and the 13/16 sub-pixel offset.

In the higher accuracy motion vector grid, additional pixel positions are shown in the dotted lines. This increases the accuracy as more sub-pixel positions between pixels L0 and R0 are included in addition to the 3/16, ½, and 13/16 sub-pixel positions. In the higher accuracy motion vector grid, higher accuracy motion vector components MV_(XHA), MV_(YHA) have remainders of 0, 3, 8, and 13 when divided by 16, respectively. This is shown at 1004 where the remainders 0, 3, 8, and 13 correspond to the L0 pixel, 3/16 sub-pixel position, ½ sub-pixel position, and 13/16 sub-pixel position. Also, if the non-uniform motion vector grid was not used, then the original motion vector components having remainders of 0, 1, 2, and 3 when dividing by 4 are mapped to the higher accuracy motion vector components having remainders of 0, 4, 8, and 12 when dividing by 16, respectively. Thus, the map up process when a uniform motion vector grid is used does not have any effect.

Referring back to FIG. 9, at 904, motion vector scaling manager 506 scales the mapped motion vector MV_(XHA), MV_(YHA) on the higher accuracy motion vector grid to a scaled motion vector MV_(XHAScaled), MV_(YHAScaled). The scaled motion vector is also on the higher accuracy motion vector grid. The scaled motion vector MV_(XHAscaled), MV_(YHAScaled) is at the same higher accuracy as motion vector MV_(XHA), MV_(YHA) and can take any position on the higher accuracy motion vector grid. The scaling may be performed as described above with equation (1) where the temporal distances between the reference picture of the motion vector predictor and the temporal distance of the reference picture of the current block are taken into account to scale the motion vector predictor.

At 906, motion vector scaling manager 506 performs a map down process. In the map down process, motion vector scaling manager 506 maps the scaled higher accuracy motion vector MV_(XHAScaled), MV_(YHAScaled) back down to the original non-uniform motion vector grid. This gives a final scaled motion vector MV_(XScaled), MV_(YScaled) on the original non-uniform motion vector grid. FIG. 11 shows an example of the map down process according to one embodiment. At 1102, the scaled motion vectors on the higher accuracy motion vector grid are shown. The values may take any of the values from the remainder of 0-15 when dividing by 16. At 1104, these values are mapped-down to the original non-uniform motion vector grid to be values of the remainder of 0, 1, 2, or 3 when dividing by 4.

Different algorithms may be used to perform the map-down process. In one example, quantization is performed that maps subsets of values from the higher accuracy motion vector grid to a smaller number of values on the non-uniform motion vector grid based on distance between values. For example, at 1106, if motion vector MV_(XHAScaled), MV_(YHAScaled) has a remainder of 1 or 15 when dividing by 16, it is quantized to the nearest integer pixel L0 or R0, respectively. For example, the values of 0 and 1 on the higher accuracy motion vector grid are mapped to the value of 0 on the non-uniform motion vector grid. Also, at 1108, the value of 15 is mapped to the integer pixel R0. At 1110, the values of 2-5 on the higher accuracy motion vector grid are mapped to the value of 1 on the non-uniform motion vector grid. Also, the values of 6-10 on the higher accuracy motion vector grid are mapped to the value of 2 on the non-uniform motion vector grid and the values of 11-14 on the higher accuracy motion vector grid are mapped to the value of 3 on the non-uniform motion vector grid. Although these mappings are described, particular embodiments may use other mappings. For example, values 2-4 may be mapped to the value of 1. Other map down algorithms may also be used.

In one example, the 3/16 phase offset in the higher accuracy motion vector grid corresponds to “3”. When the scaling is performed using the temporal distance, the scaling may be equal to (4×) ( 3/16))/1= 12/16 pel. The 12/16 pel value is mapped to the phase offset of 3 in the non-uniform motion vector grid. Thus, the same value of 3 is determined in the scaling. Thus, instead of determining the 1 pel value as described above in the Background, particular embodiments determine a value of 13/16 pel, which is closer to 12/16 pel than 1 pel. Accordingly, the scaled motion vector using particular embodiment is more accurate.

Encoder and Decoder Examples

Particular embodiments may be used in both the encoding and decoding processes. In encoding, the motion vector predictor is determined for a current block. Then, motion vector scaling manager 506 determines the scaled motion vector. Encoder 502 may code the motion vector predictor to use for the current block in the bitstream sent to decoder 504. Decoder 504 receives the bitstream for decoding. For the current block, decoder 504 determines the motion vector predictor that was used in the encoding process. Then, motion vector scaling manager 506 determines the scaled motion vector. The following describes encoder 502 and decoder 504 in more detail.

FIG. 12A depicts an example of an encoder 502 according to one embodiment. A general operation of encoder 502 will now be described. It will be understood that variations on the encoding process described will be appreciated by a person skilled in the art based on the disclosure and teachings herein.

For a current PU, x, a prediction PU, x′, is obtained through either spatial prediction or temporal prediction. The prediction PU is then subtracted from the current PU, resulting in a residual PU, e. A spatial prediction block 1204 may include different spatial prediction directions per PU, such as horizontal, vertical, 45-degree diagonal, 135-degree diagonal, DC (flat averaging), and planar.

A temporal prediction block 1206 performs temporal prediction through a motion estimation and motion compensation operation. The motion estimation operation searches for a best match prediction for the current PU over reference pictures. The best match prediction is described by a motion vector (MV) and associated reference picture (refldx). The motion vector and associated reference picture are included in the coded bit stream.

Transform block 1207 performs a transform operation with the residual PU, e. Transform block 1207 outputs the residual PU in a transform domain, E.

A quantizer 1208 then quantizes the transform coefficients of the residual PU, E. Quantizer 1208 converts the transform coefficients into a finite number of possible values. Entropy coding block 1210 entropy encodes the quantized coefficients, which results in final compression bits to be transmitted. Different entropy coding methods may be used, such as context-adaptive variable length coding (CAVLC) or context-adaptive binary arithmetic coding (CABAC).

Also, in a decoding process within encoder 502, a de-quantizer 1212 de-quantizes the quantized transform coefficients of the residual PU. De-quantizer 1212 then outputs the de-quantized transform coefficients, E′. An inverse transform block 1214 receives the de-quantized transform coefficients, which are then inverse transformed resulting in a reconstructed residual PU, e′. The reconstructed PU, e′, is then added to the corresponding prediction, x′, either spatial or temporal, to form the new reconstructed PU, x″. A loop filter 1216 performs de-blocking on the reconstructed PU, x″, to reduce blocking artifacts. Additionally, loop filter 1216 may perform a sample adaptive offset process after the completion of the de-blocking filter process for the decoded picture, which compensates for a pixel value offset between reconstructed pixels and original pixels. Also, loop filter 1216 may perform adaptive filtering over the reconstructed PU, which minimizes coding distortion between the input and output pictures. Additionally, if the reconstructed pictures are reference pictures, the reference pictures are stored in a reference buffer 1218 for future temporal prediction.

Interpolation filter 1220 interpolates sub-pixel pixel values for temporal prediction block 11206. The phase offsets may be non-uniform. Temporal prediction block 1206 then uses the sub-pixel pixel values outputted by interpolation filter 1220 to generate a prediction of a current PU.

FIG. 12B depicts an example of decoder 104 according to one embodiment. A general operation of decoder 504 will now be described. It will be understood that variations on the decoding process described will be appreciated by a person skilled in the art based on the disclosure and teachings herein. Decoder 504 receives input bits from encoder 502 for compressed video content.

An entropy decoding block 1230 performs entropy decoding on input bits corresponding to quantized transform coefficients of a residual PU. A de-quantizer 1232 de-quantizes the quantized transform coefficients of the residual PU. De-quantizer 1232 then outputs the de-quantized transform coefficients of the residual PU, E′. An inverse transform block 1234 receives the de-quantized transform coefficients, which are then inverse transformed resulting in a reconstructed residual PU, e′.

The reconstructed PU, e′, is then added to the corresponding prediction, x′, either spatial or temporal, to form the new constructed PU, x″. A loop filter 1236 performs de-blocking on the reconstructed PU, x″, to reduce blocking artifacts. Additionally, loop filter 1236 may perform a sample adaptive offset process after the completion of the de-blocking filter process for the decoded picture, which compensates for a pixel value offset between reconstructed pixels and original pixels. Also, loop filter 1236 may perform an adaptive loop filter over the reconstructed PU, which minimizes coding distortion between the input and output pictures. Additionally, if the reconstructed pictures are reference pictures, the reference pictures are stored in a reference buffer 1238 for future temporal prediction.

The prediction PU, x′, is obtained through either spatial prediction or temporal prediction. A spatial prediction block 1240 may receive decoded spatial prediction directions per PU, such as horizontal, vertical, 45-degree diagonal, 135-degree diagonal, DC (flat averaging), and planar. The spatial prediction directions are used to determine the prediction PU, x′.

Interpolation filter 1224 interpolates sub-pixel pixel values for input into a temporal prediction block 1242. The phase offsets may be non-uniform as described above. Temporal prediction block 1242 performs temporal prediction using decoded motion vector information and interpolated sub-pixel pixel values outputted by interpolation filter 106 in a motion compensation operation. Temporal prediction block 1242 outputs the prediction PU, x′.

Particular embodiments may be implemented in a non-transitory computer-readable storage medium for use by or in connection with the instruction execution system, apparatus, system, or machine. The computer-readable storage medium contains instructions for controlling a computer system to perform a method described by particular embodiments. The instructions, when executed by one or more computer processors, may be operable to perform that which is described in particular embodiments.

As used in the description herein and throughout the claims that follow, “a”, “an”, and “the” includes plural references unless the context clearly dictates otherwise. Also, as used in the description herein and throughout the claims that follow, the meaning of “in” includes “in” and “on” unless the context clearly dictates otherwise.

The above description illustrates various embodiments along with examples of how aspects of particular embodiments may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of particular embodiments as defined by the following claims. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations and equivalents may be employed without departing from the scope hereof as defined by the claims. 

What is claimed is:
 1. A method for determining a scaled motion vector for a first block, the method comprising: determining a motion vector for a second block, wherein the motion vector is on a non-uniform motion vector grid; mapping, by a computing device, the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling, by the computing device, the motion vector for the second block on the higher accuracy motion vector grid; and mapping, by the computing device, the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process.
 2. The method of claim 1, wherein the non-uniform motion vector grid includes a first number of sub-pixel positions between two full-pixel positions and the higher accuracy motion vector grid includes a second number of sub-pixel positions between the two full-pixel positions greater than the first number.
 3. The method of claim 1, wherein scaling the motion vector for the second block on the higher accuracy motion vector grid comprises scaling the motion vector based on a difference between a first reference picture for the first block and a second reference picture for the second block.
 4. The method of claim 3, wherein the difference is temporal.
 5. The method of claim 1, wherein the scaled motion vector on the higher accuracy motion vector grid is allowed to take any position on the higher accuracy motion vector grid.
 6. The method of claim 1, wherein mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid comprises using an algorithm to perform the mapping to the non-uniform motion vector grid.
 7. The method of claim 6, wherein the algorithm includes mapping a subset of positions on the higher accuracy motion vector grid of the higher accuracy to a single position on the non-uniform motion vector grid.
 8. The method of claim 1, wherein: the non-uniform motion vector grid includes sub-pixel positions that are non-uniformly spaced between two full-pixel positions, and the higher accuracy motion vector grid includes sub-pixel positions that are uniformly spaced between two full-pixel positions.
 9. The method of claim 1, further comprising: coding information for the scaled motion vector in a bitstream for the video content; and sending the bitstream from an encoder to a decoder.
 10. A method for determining a scaled motion vector for a first block, the method comprising: receiving a bitstream from an encoder at a decoder; determining a motion vector for a second block using information in the bitstream, wherein the motion vector is on a non-uniform motion vector grid; mapping, by the decoder, the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling, by the decoder, the motion vector for the second block on the higher accuracy motion vector grid; and mapping, by the decoder, the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process to decode the bitstream.
 11. The method of claim 10, wherein the non-uniform motion vector grid includes a first number of sub-pixel positions between two full-pixel positions and the higher accuracy motion vector grid includes a second number of sub-pixel positions between the two full-pixel positions greater than the first number.
 12. The method of claim 10, wherein scaling the motion vector for the second block on the higher accuracy motion vector grid comprises scaling the motion vector based on a difference between a first reference picture for the first block and a second reference picture for the second block.
 13. The method of claim 10, wherein the scaled motion vector on the higher accuracy motion vector grid is allowed to take any position on the higher accuracy motion vector grid.
 14. An apparatus configured to determine a scaled motion vector for a first block, the apparatus comprising: one or more computer processors; and a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for: determining a motion vector for a second block, wherein the motion vector is on a non-uniform motion vector grid; mapping the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling the motion vector for the second block on the higher accuracy motion vector grid; and mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process.
 15. The apparatus of claim 14, wherein the non-uniform motion vector grid includes a first number of sub-pixel positions and the higher accuracy motion vector grid includes a second number of sub-pixel positions greater than the first number.
 16. The apparatus of claim 14, wherein scaling the motion vector for the second block on the higher accuracy motion vector grid comprises scaling the motion vector based on a difference between a first reference picture for the first block and a second reference picture for the second block.
 17. The apparatus of claim 16, wherein the difference is temporal.
 18. The apparatus of claim 14, wherein mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid comprises using an algorithm to perform the mapping to the non-uniform motion vector grid.
 19. The apparatus of claim 18, wherein the algorithm includes mapping a subset of positions on the higher accuracy motion vector grid of the higher accuracy to a single position on the non-uniform motion vector grid.
 20. The apparatus of claim 14, wherein: the non-uniform motion vector grid includes sub-pixel positions that are non-uniformly spaced between sub-pixel positions, and the higher accuracy motion vector grid includes sub-pixel positions that are uniformly spaced between sub-pixel positions.
 21. The apparatus of claim 14, further operable for: coding information for the scaled motion vector in a bitstream for the video content; and sending the bitstream from an encoder to a decoder.
 22. The apparatus of claim 14, further operable for: receiving a bitstream from an encoder at a decoder; determining the motion vector for the second block using information in the bitstream; and performing the scaling to determine the scaled motion vector for a decoding process of the bitstream.
 23. An apparatus configured to determine a scaled motion vector for a first block, the apparatus comprising: one or more computer processors; and a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for: receiving a bitstream from an encoder at a decoder; determining a motion vector for a second block using information in the bitstream, wherein the motion vector is on a non-uniform motion vector grid; mapping the motion vector for the second block to a higher accuracy uniform motion vector grid that is of a higher accuracy than the non-uniform motion vector grid; scaling the motion vector for the second block on the higher accuracy motion vector grid; and mapping the scaled motion vector on the higher accuracy motion vector grid to the non-uniform motion vector grid, wherein the scaled motion vector on the non-uniform motion vector grid is associated with the first block for a temporal prediction process to decode the bitstream. 